from fastapi import APIRouter
from typing import List, Dict, Any
from ..config import config

router = APIRouter()

@router.get("/nodes/types", response_model=List[Dict[str, Any]])
async def get_node_types():
    node_configs = config.get("nodes", {})
    return [
        {"type": node_type, "description": details.get("description", "")}
        for node_type, details in node_configs.items()
    ]